Skip to content

Conversation

@boriel
Copy link
Collaborator

@boriel boriel commented Dec 14, 2024

Fixes #927

@boriel boriel self-assigned this Dec 14, 2024
@boriel boriel requested a review from bartsanchez December 14, 2024 19:48
"union-attr",
"var-annotated",
]
exclude = [
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bartsanchez The entire src/ply/*.py should be excluded.

Fixing linting in these 3rd party files might introduce bugs and the lints are lost every time the library is updated (fortunately is a very stable one, so no need to update it very often).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are binary (pickled / Python serialized) classes. The compiler takes like 10 seconds or more to generate these tables upon start up. With this cache the start time is < 1 sec.


from src.ply.yacc import LRParser


Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test now checks that the compiler correctly builds the parsetabs, so if we decide to change PLY again in the future this will check the tables are correctly rebuild again.

@boriel boriel merged commit 355f6df into main Dec 15, 2024
1 check passed
@boriel boriel deleted the fix/broken_table_generation branch December 15, 2024 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Bug]: Cannot regenerate parsing tables

2 participants